package framework.exceptions;

/**
 * 通用Web异常
 */
public class WebException extends RuntimeException {

    private int _errorCode = 500;

    public int errorCode() {
        return _errorCode;
    }

    public WebException() {
        super();
    }

    public WebException(String message) {
        super(message);
    }

    public WebException(int errorCode, String message) {
        super(message);
        this._errorCode = errorCode;
    }

    public WebException(String message, Throwable cause) {
        super(message, cause);
    }

    public WebException(int errorCode, Throwable cause) {
        super(cause.getMessage(), cause);
        this._errorCode = errorCode;
    }

}
